const action = {
  getBannerListAction (dispatch) {
    fetch('http://121.89.205.189/api/banner/list')
      .then(res => res.json())
      .then(res => {
        dispatch({
          type: 'CHANGE_HOME_BANNER_LIST',
          payload: res.data
        })
      })
  },
  getProListAction (params) {
    return (dispatch) => {
      fetch('http://121.89.205.189/api/pro/list?limitNum=' + params.limitNum)
        .then(res => res.json())
        .then(res => {
          dispatch({
            type: 'CHANGE_HOME_PRO_LIST',
            payload: res.data
          })
        })
    }
  }
}

export default action